<template>
	<view>

		<view >
			<view style="background-image:url('../../static/background2.png'); " class="biaoTu">
				<view>
					<view class='content'>
						<text>申请获取以下权限</text>
						<text>获得你的公开信息(昵称，头像等)</text>
					</view>
					<button class='bottom' type='primary' @click="getProfile">
						授权登录
					</button>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		mapMutations,
		mapGetters
	} from 'vuex';

	export default {
		

		data() {
			return {
				
				
			}
		},

		methods: {
		
			...mapGetters(['userInfo']),
			...mapMutations(['login']),
			//处理跳转 
			getProfile() {
				uni.getUserProfile({ 
					lang: 'zh_CN',
					desc: '用于获取您的个人信息',
					success: res => {
						this.login(res.userInfo);
						uni.navigateTo({
							url: "../YQMain/YQMain"
						})
						
						
					},
					fail: err => {
						uni.showToast({
							title: '你已拒绝登录',
							icon: 'error',
							duration: 2000
						});
					}
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.header {
		margin: 90rpx 0 90rpx 50rpx;
		border-bottom: 1px solid #ccc;
		text-align: center;
		width: 650rpx;
		height: 300rpx;
		line-height: 450rpx;
	}

	.header image {
		width: 200rpx;
		height: 200rpx;
	}

	.content {

		margin-left: -280rpx;
		margin-top: -170rpx;
	}

	.content text {
		display: block;
		color: #9d9d9d;
		margin-top: 40rpx;
	}

	.bottom {
		margin-left: -280rpx;
		border-radius: 80rpx;
		margin-top: 50rpx;
		font-size: 35rpx;
	}

	.uni-ec-canvas {
		width: 750rpx;
		height: 750rpx;
		display: block;
	}

	.tu {
		/* border-color: #5500ff; */
		/* border-width: 50rpx; */
		display: block; //盒子模型
		/*flex-direction: row; */
		/*height: 100rpx;*/
		width: 750rpx;
		position: relative;
		left: 125rpx;
		top: 100rpx;
		color: #ffffff;
		background-color: #05132d;
	}

	.tu text {

		//盒子模型
		/*border: #4CD964; */

		color: #0092D5;

		margin: 30rpx;
		position: relative;
		/*top: 220rpx;*/
		left: 20rpx;
		white-space: pre-wrap;
	}

	.tu_btn {
		width: 400rpx;
		height: 150rpx;
		text-align: center;
		line-height: 34px;
		border-radius: 34px;
		background-color: #05132d;
		font-size: 20px;
		font-weight: 700;
	}

	.biaoTu {
		display: flex;
		width: 70%;
		padding: 270rpx;
		justify-content: center; //垂直居中
		background-size: 80%;
		border-radius: 5px; //圆角
		height: 650rpx;

	}

	.biaoTu2 {

		width: 100%;
		padding: 70rpx;

		background-size: 100%;
		height: 800rpx;

	}

	.banner_box {
		display: flex;
		width: 100%;
		padding: 20rpx;
		justify-content: center; //垂直居中
		align-items: center; //水平居中
		border-radius: 5px; //圆角

		.swiper {
			width: 90%;
			height: 400rpx;

			.banner {
				width: 90%;
				height: 400rpx;
			}
		}
	}

	.coure_box {
		display: flex;
		position: absolute;
		top: 700rpx;
		left: 250rpx;
		width: 100%;
		color: #ffffff;
		justify-content: center;
		align-items: center;
		box-sizing: border-box; //改盒子不可以超过父盒大小
		overflow: hidden;
		padding: 0 15px;
		justify-content: space-between;
		align-content: space-between;
		flex-wrap: wrap;

		.coure_box_T {
			font-size: 20px;
			font-weight: 700;
		}
	}





</style>
